var myQueue = function () {
    this.stack1 = [];
    this.stack2 = [];
}

myQueue.prototype.appendTail = function (value) {
    this.stack1.push(value);
}

myQueue.prototype.deteleHead = function () {
    if (this.stack2.length) {
        return this.stack2.pop();
    } else {
        while (this.stack1.length) {
            this.stack2.push(this.stack1.pop());
        }
        if (this.stack2.length) {
            return this.stack2.pop();
        }
        return -1;
    }
}